const KEY_WORDS = "his_list";

// 获取搜索历史
export const getHistory = () => {
  const res = localStorage.getItem(KEY_WORDS);
  return res ? JSON.parse(res) : [];
};
// 设置搜索历史
export const setHistory = (arr) => {
  return localStorage.setItem(KEY_WORDS, JSON.stringify(arr));
};
